package com.hello;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;

/**
 * @author : zga
 * @date : 2016-09-22
 */
public class Test {
    public static void main(String[] args) {
        int arr[] = {1,23,4,5};

        System.out.println(Arrays.toString(arr));

        String a = "";
        for (int i = 0; i < arr.length ; i++) {
            if (i == 0) {
                a = "[" + arr[i] + ",";
            } else if (i == arr.length - 1){
                a += arr[i] + "]";
            } else {
                a += arr[i] + ",";
            }
        }
        System.out.println("a is : " + a);


        String str = "0";

        str += "zhuzi";



        System.out.println(str);//0zhuzi

    }

    //提取方法
    //command + alt + m

    //重命名
    //shift + F6



    public static void test() {
        try {
            testMethod();
        } catch (FileNotFoundException e ){
            e.printStackTrace();
        } catch (Exception e) {
            System.out.println(e);
        }
    }

    private static void testMethod() throws IOException {
        FileInputStream fileInputStream = new FileInputStream(new File(("")));
        fileInputStream.read();

        int num = 1/0;
    }
}
